<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<table border="1" cellpadding="0" cellspacing="0">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>手机</th>
        <th>创建时间</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${professors}" var="p">
        <tr>
            <td>${p.id}</td>
            <td>${p.professorName}
            </td>
            <td>${p.phone}
            </td>
            <td><fmt:formatDate value="${p.createDate}" pattern="yyyy年MM月dd日"/></td>
            <td>
                <a onclick="return confirm('真的要删除码？')" href="#">删除</a>
                <a href="#">修改</a>
            </td>
        </tr>
    </c:forEach>
</table>
<p style="text-align: center">
    <a href="professor?pageNo=1">第一页</a>
    <c:if test="${pageNo>1}">
        <a href="professor?pageNo=${pageNo-1}">上一页</a>
    </c:if>

    <input style="width:40px" value="${pageNo}" type="number" id="go" name="goto" min="1" max="${pages}"/>
    <input type="button" value="Go" onclick="gotoPage()"/>

    <c:if test="${pageNo<pages}">
        <a href="professor?pageNo=${pageNo+1}">下一页</a>
    </c:if>
    <a href="professor?pageNo=${pages}">最后一页</a>
</p>
</body>
</html>
